<?php
session_start();

if(isset($_GET["id"]){
	$itineraryId = $_GET["id"];
	$url = "http://api.quocity.com/quocity.svc/json/itinerary/".$itineraryId;	
	$json = file_get_contents($url);	
	$itinerary = json_decode($json, true);
}



?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="es">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
	<meta name="author" content="Jorge Villabona Garcia, Ismael Gaudioso Anguas, Alvaro Prieto Lauroba" />
	<meta name="keywords" content="Puntos turísticos, monumentos, guia online, tour, turismo, gratis" />
	<meta name="description" content="¿De visita en una ciudad y no sabes por dónde empezar a recorrerlo? ¡Deja que QuoCity te indique el mejor camino!" />
	<title>QuoCity - el mundo al alcance de tu mano</title>
	<link rel="stylesheet" href="css/reset.css" />
	<link rel="stylesheet" href="css/utils.css" />
	<link rel="stylesheet" href="css/scrollbar.css" />	
	<link rel="stylesheet" href="css/rating.css" />		
	<link rel="stylesheet" href="css/mainScreen.css" />
	<script src="js/jquery.js"></script>
	<script src="js/jquery.marquee.js"></script>
	<script src="js/scrollbar.js"></script>
	<script src="js/rating.js"></script>	
	<script src="js/mainScreen.js"></script>
	
	<script src="js/login.js"></script>
	
	<script type="text/javascript">
	  var rpxJsHost = (("https:" == document.location.protocol) ? "https://" : "http://static.");
	  document.write(unescape("%3Cscript src='" + rpxJsHost +
	"rpxnow.com/js/lib/rpx.js' type='text/javascript'%3E%3C/script%3E"));
	</script>
	<script type="text/javascript">
	  RPXNOW.overlay = true;
	  RPXNOW.language_preference = 'en';
	</script>

</head>

<body>

<div class="itinerary">

	<?php 
	
	//var_dump($itinerary);
	echo '<div class="ItineraryId">'.$itinerary["ItineraryId"].'</div>';
	echo '<div class="CityId">'.$itinerary["CityId"].'</div>';
	echo '<div class="Name">'.$itinerary["Name"].'</div>';
	echo '<div class="Description">'.$itinerary["Description"].'</div>';
	echo '<div class="Mark">'.$itinerary["Mark"].'</div>';
	echo '<div class="NumberOfMarks">'.$itinerary["NumberOfMarks"].'</div>';
	echo '<div class="Public">'.$itinerary["Public"].'</div>';
	
	echo '<div class="ItineraryItems">';
	
	foreach($itinerary["ItineraryItems"] as $item){
		
		echo '<div class="ItineraryId">'.$item["ItineraryId"].'</div>';
		echo '<div class="ItemId">'.$item["ItemId"].'</div>';
		echo '<div class="Longitude">'.$item["Longitude"].'</div>';
		echo '<div class="Latitude">'.$item["Latitude"].'</div>';
		echo '<div class="Name">'.$item["Name"].'</div>';
		echo '<div class="Notes">'.$item["Notes"].'</div>';
		echo '<div class="SortIndex">'.$item["SortIndex"].'</div>';
	}
	
	echo '</div>';
	
	
	?>
	
		
	
	</div>
</div>


</body>

</html>